<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>demo</title>
</head>
<body>
    trimStart()和trimEnd()这两个方法。它们的行为与trim()一致，trimStart()消除字符串头部的空格，trimEnd()消除尾部的空格。它们返回的都是新字符串，不会修改原始字符串。
</body>
<script type="text/javascript">

const s = '  abc  ';
console.log(s.trim()); // "abc"
console.log(s.trimStart()); // "abc  "
console.log(s.trimEnd()); // "  abc"
</script>
</html>
